package com.qi.services;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qi.pojo.dto.LoginBody;
import com.qi.pojo.dto.RegisterBody;
import com.qi.pojo.dto.UpdateUserBody;
import com.qi.pojo.entity.User;
import com.qi.pojo.vo.UserDetails;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface IUserService extends IService<User> {

    void recepLogin(LoginBody loginBody);

    void adminLogin(LoginBody loginBody);

    @Transactional
    void register(RegisterBody registerBody);

    UserDetails getCurUser();

    User getCurUserInfo();

    UserDetails getUserDetailsByUserId(Long userId);

    List<User> userList(String name, String gender);

    IPage<User> userListPage(Long page, Long size, String name, String gender);

    List<User> nativeUserList(String name, String gender);

    void setRole(Long userId, String roleKey);

    void modify(UpdateUserBody updateUserBody);

    void kickOut(Long userId);
}
